package com.wy.recyclerview.commonRecyclerAdapter;

import android.content.Context;

import com.wy.recyclerview.R;
import com.wy.recyclerview.decoration.Fruit;

import java.util.List;

/**
 * Time:8/20/21
 * Author:ypf
 * Description:
 */
public class MyAdapter1 extends CommonRecyclerAdapter<Fruit> {

    public MyAdapter1(Context context, List<Fruit> fruitList) {
        super(context, fruitList, R.layout.item_main);
    }

    @Override
    public void convert(ViewHolder holder, Fruit item) {
        holder.setText(R.id.tv, item.getName());
        holder.setImageResource(R.id.iv, item.getRes());
    }

}
